package exception;

import javafx.beans.binding.When;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.util.Map;

public class ReadXml
{

    public static void main(String[] args)
    {

    }

    public void writeUrl()
    {
        FileOutputStream x = null;
        File imgs = new File("pic/");
        File[] files = null;
        String[] paths = null;
        if (imgs.isDirectory())
        {
            files = imgs.listFiles();
            paths = new String[files.length];
        }
        int i = 0 ;
        for (File file : files)
        {
            paths[i] = file.getAbsolutePath();
        }
        try
        {
            x = new FileOutputStream("src/exception/dir.xml");
            for (String path : paths)
            {
                String url = "<url>" + path + "</url>;";
            }

        }catch (Exception e)
        {
            e.printStackTrace();
        }
    }

}
